/**
 * Created by liguangsong on 16/8/11.
 */
import { TOUCH_MOVE, TOUCH_CANCEL } from '../action/index.js'

function initialState() {
    return {
        nameColor: 'rgb(88, 104, 131)',
        teamColor: 'rgb(138, 148, 168)'
    }
}

function touchPlayer(state=initialState(), action) {
    switch (action.type) {
        case TOUCH_MOVE: {
            return {
                nameColor: 'black',
                teamColor: 'black'
            }
        }
        case TOUCH_CANCEL: {
            return {
                nameColor: 'rgb(88, 104, 131)',
                teamColor: 'rgb(138, 148, 168)'
            }
        }
        default : {
            return {
                nameColor: '',
                teamColor: ''
            }
        }
    }
}

export default touchPlayer;